package com.luci.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.ArrayList;
import java.util.List;

/**
 * 配置参数类
 *
 * @author yuyanan01@beyondsoft.com
 * @version 1.0
 * @date 18-11-21
 */
@Data
@ConfigurationProperties(prefix = "fast.auth")
public class AuthProperties {

    /**
     * 需要过滤的url-ant风格
     */
    private List<String> antUrl = new ArrayList<>();

    /**
     * 过期天数 默认5天
     */
    private byte expireDays = 5;

    /**
     * jwt token 密钥
     */
    private String secret = "P@ssw02d";

    /**
     * 开启跨域
     */
    private Boolean crossDomain = true;

    /**
     * 默认session无效
     */
    private Boolean sessionInvalid = true;

    /**
     * 是否将请求header头信息放入缓存中
     */
    private Boolean headerCache = false;

    /**
     * 登陆地址
     */
    private String loginUrl = "/login";

    /**
     * 登陆方式
     */
    private String loginMethod = "POST";

    /**
     * jwt
     */
    private String jwtHeaderKey = "Authorization";
    private String jwtHeaderValueStart = "Bearer ";

}
